//更改
const db=require("../lib/db.js")
function updateIdArticle(up_id,up_title,up_content){
    console.log(up_id,up_title,up_content)
    return new Promise((resolve,reject)=>{
        let sql = `update  content set article_title=${up_title},content=${up_content} where _id=${up_id}`
        db.quarySql(sql).then(data =>{
            console.log(data)
            if(data.length == 0){
            resolve(500)
            }else{
                resolve(200)
            }      
        })
   })

}
//导出
module.exports=updateIdArticle;